import { WeaTools } from 'ecCom';

export const getCustomerTab = params => // 获取客户的tab内容
  WeaTools.callApi('/api/crm/customer/customerTab', 'GET', params);


export const getCustomerView = params => // 获取客户基本信息
  WeaTools.callApi('/api/crm/customer/customerView', 'GET', params);


// 获取我的客户=-联系人卡片信息
export const getContacterCard = params => WeaTools.callApi('/api/crm/customer/contacterCard', 'POST', params);

export const editCustomerInfo = params => // 编辑保存客户基本信息
  WeaTools.callApi('/api/crm/customer/customerEdit', 'GET', params);


export const editContracterData = params => // 编辑保存客户基本信息   联系人  即时编辑 -- 新建保存
  WeaTools.callApi('/api/crm/customer/contacterEdit', 'POST', params);


export const customerRepeatCheck = params => // 验证重名
  WeaTools.callApi('/api/crm/customer/customerRepeatCheck', 'GET', params);


export const getOutResourceInfo = params => // 获取外部用户列表
  WeaTools.callApi('/api/crm/customer/outResourceList', 'GET', params);


export const getOutResourceAdd = params => // 获取外部用户列表  新建
  WeaTools.callApi('/api/crm/customer/outResourceAddForm', 'GET', params);


export const saveOutResourceAdd = params => // 获取外部用户列表  增删改操作
  WeaTools.callApi('/api/crm/customer/outResourceOpertion', 'GET', params);


export const getOutResourceDetail = params => // 获取外部用户列表  查看详情
  WeaTools.callApi('/api/crm/customer/outResourceEditForm', 'GET', params);


export const getShareList = params => // 获取共享设置列表  查看
  WeaTools.callApi('/api/crm/customer/shareList', 'GET', params);


export const deleteShareList = params => // 获取共享设置列表  删除
  WeaTools.callApi('/api/crm/customer/deleteShare', 'GET', params);


export const saveShareList = params => // 获取共享设置列表  新建
  WeaTools.callApi('/api/crm/customer/addShare', 'GET', params);


export const getViewLogList = params => // 获取修改记录列表
  WeaTools.callApi('/api/crm/customer/viewLog', 'GET', params);


export const getViewLogCondition = params => // 获取修改记录   高级搜索
  WeaTools.callApi('/api/crm/customer/viewLogCondition', 'GET', params);


export const getViewAddressList = params => // 获取地址管理列表
  WeaTools.callApi('/api/crm/address/addresslist', 'GET', params);


export const viewAddressAddForm = params => // 地址管理    新建
  WeaTools.callApi('/api/crm/address/addForm', 'GET', params);


export const saveAddressAdd = params => // 地址管理    新建  保存
  WeaTools.callApi('/api/crm/address/addressAdd', 'GET', params);


export const deleteAddress = params => // 地址管理列表   删除
  WeaTools.callApi('/api/crm/address/addressDelete', 'GET', params);


export const addressEditForm = params => // 地址管理列表   编辑
  WeaTools.callApi('/api/crm/address/editForm', 'GET', params);


export const saveAddressEditForm = params => // 地址管理列表   编辑  保存
  WeaTools.callApi('/api/crm/address/addressEdit', 'GET', params);


export const getListSellChance = params => // 客户卡片 - 商机管理列表
  WeaTools.callApi('/api/crm/sellchance/list', 'GET', params);


export const deleteSellChance = params => // 客户卡片 - 商机管理    批量删除
  WeaTools.callApi('/api/crm/sellchance/delete', 'POST', params)
;

export const getEvaluationInfo = params => // 客户价值   列表信息
  WeaTools.callApi('/api/crm/customer/crmEvaluation', 'GET', params)
;

export const getEvaluationStandard = params => // 客户价值   评估标准
  WeaTools.callApi('/api/crm/customer/evaluation', 'GET', params)
;

export const evaluationUpdate = params => // 客户价值   更新
  WeaTools.callApi('/api/crm/customer/crmEvaluationUpdate', 'GET', params)
;

/** *联系人图谱 */
export const getContacterMap = params => // 联系人图谱
  WeaTools.callApi('/api/crm/contacter/contacterMap', 'POST', params)
;

export const getContacterMapLogs = params => // 联系人地图-日志列表
  WeaTools.callApi('/api/crm/contacter/contacterMapLogs', 'POST', params)
;

export const contacterMapOperate = params => // 联系人地图-节点操作
  WeaTools.callApi('/api/crm/contacter/contacterMapOperate', 'POST', params)
;

export const contacterEditSave = params => // 联系人地图- 编辑保存
  WeaTools.callApi('/api/crm/contacter/contacterEdit', 'POST', params)
;


export const getRightMenuList = params => // 请求右键的
  WeaTools.callApi('/api/crm/rightMenu/menuInfo', 'GET', params);

/**
 * 权限表单
 */
export const getFormCondition = params => WeaTools.callApi('/api/crm/sellchance/auth/getCreaterAuthorFormCondition', 'GET', params);

export const getAddressInfo = params => // 根据区县获取 国家省份城市
  WeaTools.callApi('/api/crm/maint/customer/getAddressInfo', 'GET', params)
;
